package com.fs.ibox_h.servie.impl;

import com.fs.ibox_h.dao.impl.withdrawalDaoImpl;
import com.fs.ibox_h.dao.withdrawalDao;
import com.fs.ibox_h.pojo.Withdrawa;
import com.fs.ibox_h.servie.withdrawalService;
import com.fs.ibox_h.util.BeanFactory;
import com.fs.ibox_h.vo.Condition;
import com.fs.ibox_h.vo.Page;

import java.util.List;

public class withdrawalServiceImpl implements withdrawalService {
    withdrawalDao service = BeanFactory.createBean(withdrawalDao.class);
    @Override
    public Page<Withdrawa> selectByCondition(int currentPage,int pageSize,Condition condition) {
        Page<Withdrawa> page = new Page();
        page.setCurrentPage(currentPage);
        page.setPageSize(pageSize);
        page.setCount(service.count(condition));
        page.setRecords(service.selectByCondition(currentPage,pageSize,condition));
        return page;
    }

    @Override
    public int deleteById(int i) {
        return service.deleteById(i);

    }

    @Override
    public int updateById(Integer id) {
        return  service.updateById(id);
    }


}
